# 模板方法模式

class TestPaper:
    def TestQuestion1(self):
        print("Test1:A. B. C. D.")
        print("(%s)" % self.Anser1())

    def TestQuestion2(self):
        print("Test2:A. B. C. D.")
        print("(%s)" % self.Anser2())

    def Anser1(self):
        return ""

    def Anser2(self):
        return ""


class TestPaperA(TestPaper):
    def Anser1(self):
        return "B"

    def Anser2(self):
        return "C"


class TestPaperB(TestPaper):
    def Anser2(self):
        return "D"

    def Anser1(self):
        return "D"


if __name__ == "__main__":
    s1 = TestPaperA()
    s2 = TestPaperB()
    print("student 1")
    s1.TestQuestion1()
    s1.TestQuestion2()
    print("student 2")
    s2.TestQuestion1()
    s2.TestQuestion2()
